package com.liujit.gateway.constants;

import static org.springframework.cloud.gateway.filter.NettyWriteResponseFilter.WRITE_RESPONSE_FILTER_ORDER;

import org.springframework.core.Ordered;

/**
 * @Description: 过滤器执行顺序
 * @Author: liujun
 * @Date: 2021/6/30 5:24 下午
 */
public interface FilterOrderConstant extends Ordered {

    /**
     * 安全拦截全局过滤器
     */
    int SECURITY_FILTER = HIGHEST_PRECEDENCE;
    /**
     * 请求日志
     */
    int REQUEST_LOG_FILTER = HIGHEST_PRECEDENCE + 1;
    /**
     * 响应日志
     */
    int RESPONSE_LOG_FILTER = WRITE_RESPONSE_FILTER_ORDER - 1;
}
